﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>

<link href="${ctx.resource}/css/shiftform.css" rel="stylesheet">
<link href="${ctx.resource}/css/select2.css" rel="stylesheet">
<link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
<link href="${ctx.resource}/css/bootstrap-datetimepicker.min.css"
	rel="stylesheet">

<title></title>

</head>

<body>

	<%@ include file="/WEB-INF/include/header.jsp"%>

	<%@ include file="/WEB-INF/include/menu.jsp"%>

	<div class="container main-content">

		<div class="panel panel-default beast-panel beast-panel-layout">

			<div class="panel-heading">
				<ol class="breadcrumb">
					<li><a href="${ctx.host}/customer">任务管理</a></li>
					<li class="active">广告管理</li>
				</ol>
			</div>

			<div class="panel-body">

				<div class="col-xs-2 beast-panel-layout-left no-horizontal-padding">
					<%@ include file="/WEB-INF/include/submenu.jsp"%>
				</div>

				<div class="col-xs-10 beast-panel-layout-right">

					<div class="beast-breadcrumb-wrapper">
						<div class="beast-breadcrumb clearfix">
							<h2>
								<i class="glyphicon glyphicon-fire" title="广告管理"></i>&nbsp;&nbsp;<span>广告管理&nbsp;-&nbsp;广告详情</span>
							</h2>
						</div>
					</div>

					<div class="beast-toolbar-wrapper top-margin-20 clearfix">
						<div class="text-right"
							style="padding-top: 10px; padding-bottom: 10px; border-bottom: 2px solid #CCC;">
							<button type="button"
								class="btn btn-default btn-shadow btn-shadow-default demo2do-btn"
								onclick="window.location.href='${ctx.host}/advertisements'">
								<i class="glyphicon glyphicon-arrow-left"></i>&nbsp;&nbsp;返回
							</button>
						</div>
					</div>

					<div class="beast-breadcrumb-wrapper top-margin-20">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>基本信息</span>
							</h2>
						</div>
					</div>

					<div class="form-horizontal bottom-margin-20">

						<div class="form-group">
							<label class="col-xs-2 control-label">投放名称：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${advertisement.adTitle }</p>
							</div>
							<label class="col-xs-2 control-label">广告主名：</label>
              <div class="col-xs-4 pull-left">
                <p class="form-control-static">
                  <a href="${advertisement.aduser.company.website }"
                    target="_BLANK">${advertisement.aduser.profile.userName }</a>
                </p>
              </div>
						</div>

						<div class="form-group">
						  <label class="col-xs-2 control-label">创建时间：</label>
              <div class="col-xs-4 pull-left">
                <p class="form-control-static">
                  <fmt:formatDate value="${advertisement.createDate}"
                    pattern="yyyy-MM-dd" />
                </p>
              </div>
							<label class="col-xs-2 control-label">投放时间：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">
									<fmt:formatDate value="${advertisement.startDate }"
										pattern="yyyy-MM-dd" />
									&nbsp;-&nbsp;
									<fmt:formatDate value="${advertisement.endDate }"
										pattern="yyyy-MM-dd" />
								</p>
							</div>
						</div>


						<div class="form-group">
							<label class="col-xs-2 control-label">审核人：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static">${advertisement.auditor }</p>
							</div>
							<label class="col-xs-2 control-label">审核状态：</label>
							<div class="col-xs-4 pull-left">
								<p class="form-control-static text-danger">${advertisement.status.description }</p>
							</div>
						</div>
          </div>
          
						<div class="beast-breadcrumb-wrapper top-margin-20">
							<div class="beast-breadcrumb yellow clearfix">
								<h2>
									<span>投放要求</span>
								</h2>
							</div>
							
						</div>
						
						<div class="form-horizontal bottom-margin-20">
						
						  <div class="form-group">
						    <label class="col-xs-2 control-label">投放平台：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">${advertisement.socialType.description }</p>
                </div>
							  <label class="col-xs-2 control-label">投放目标：</label>
	              <div class="col-xs-4 pull-left">
	                <c:choose>
	                  <c:when test="${advertisement.type eq 'BUDGET'}">
	                    <p class="form-control-static">${advertisement.putNumber}&nbsp;元</p>
	                  </c:when>
	                  <c:when test="${advertisement.type eq 'QUANTITY'}">
	                    <p class="form-control-static">${advertisement.putNumber}&nbsp;预估阅读量</p>
	                  </c:when>
	                </c:choose>
	              </div>
              </div>
              
              <div class="form-group">
	              <label class="col-xs-2 control-label">投放类型：</label>
	              <div class="col-xs-4 pull-left">
	                <p class="form-control-static">${advertisement.type.description}</p>
	              </div>
	              <label class="col-xs-2 control-label">已完成：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">
                    <c:choose>
                      <c:when test="${advertisement.type eq 'BUDGET'}">
                        ${advertisement.claimNumber}&nbsp;元
                      </c:when>
                      <c:when test="${advertisement.type eq 'QUANTITY'}">
                        ${advertisement.claimNumber}&nbsp;阅读量
                      </c:when>
                    </c:choose>
                  </p>
                </div>
              </div> 
              
						</div>

						<div class="beast-breadcrumb-wrapper top-margin-20">
							<div class="beast-breadcrumb yellow clearfix">
								<h2>
									<span>投放标签</span>
								</h2>
							</div>
						</div>


						<div class="form-horizontal bottom-margin-20">

							<div class="form-group">
								<label class="col-xs-2 control-label">兴趣标签：</label>
								<div class="col-xs-4 pull-left">
									<p class="form-control-static">
										<c:forEach var="interestTagCode"
											items="${advertisement.advertisementTag.stringInterestTagCodes}">
											<label class="label label-outline label-info">${persist.interestTags[interestTagCode].name}</label>
										</c:forEach>
									</p>
								</div>
								<label class="col-xs-2 control-label">生活标签：</label>
								<div class="col-xs-4 pull-left">
									<p class="form-control-static">
										<c:forEach var="lifeTagCode"
											items="${advertisement.advertisementTag.stringLifeTagCodes}">
											<label class="label label-outline label-info">${persist.lifeTags[lifeTagCode].name}</label>
										</c:forEach>
									</p>
								</div>
							</div>

							<div class="form-group">
								<label class="col-xs-2 control-label">性别标签：</label>
								<div class="col-xs-4 pull-left">
									<p class="form-control-static">
										<c:forEach var="sexTagCode"
											items="${advertisement.advertisementTag.stringSexTag}">
											<label class="label label-outline label-info">${persist.sexTags[sexTagCode].name}</label>
										</c:forEach>
									</p>
								</div>
								
								
								<label class="col-xs-2 control-label">地域标签：</label>
								<div class="col-xs-4 pull-left">
									<p class="form-control-static">
										<c:forEach var="areaTagCode"
											items="${advertisement.advertisementTag.stringAreaTag}">
											<label class="label label-outline label-info">${persist.areaTags[areaTagCode].name}</label>
										</c:forEach>
									</p>
								</div>
							</div>

							<div class="form-group">
								<label class="col-xs-2 control-label">年龄标签：</label>
								<div class="col-xs-4 pull-left">
									<p class="form-control-static">
										<c:forEach var="ageTagCode"
											items="${advertisement.advertisementTag.stringAgeTag}">
											<label class="label label-outline label-info">${persist.ageTags[ageTagCode].name}</label>
										</c:forEach>
									</p>
								</div>
							</div>

						</div>

						
					<div class="beast-breadcrumb-wrapper top-margin-20"
						style="margin-top: 50px;">
						<div class="beast-breadcrumb yellow clearfix">
							<h2>
								<span>广告素材</span>
							</h2>
						</div>
					</div>

			<div class="form-horizontal bottom-margin-20">
			  <div class="form-group">
                <label class="col-xs-2 control-label">关键字：</label>
                <div class="col-xs-9 col-xs-offset-2">
                   <div class="row">
                     <c:forEach var="KeywordCode"
                       items="${advertisement.material.materialKeywords}">
                       <div class="col-md-2">
                         ${KeywordCode.keywords}
                       </div>
                     </c:forEach>
                   </div>
                 </div>
              </div>
              
              <div class="form-group">
                <label class="col-xs-2 control-label">文字描述：</label>
                <div class="col-xs-9 col-xs-offset-2">
                  <p class="form-control-static">${advertisement.material.description }</p>
                </div>
              </div>
              <c:choose>
                <c:when test="${advertisement.material.type.name eq 'GRAPHIC'}">
                  <div class="form-group">
                    <label class="col-xs-2 control-label">图文素材：</label>
                    <div class="col-xs-9 col-xs-offset-2">
                      <div class="row">
                        <c:forEach var="materialImage"
                          items="${advertisement.material.materialImages}">
                          <div class="col-md-2">
                            <img src="${ctx.qiniu}/${materialImage.image}!200">
                          </div>
                        </c:forEach>
                      </div>
                    </div>
                  </div>
                </c:when>
                <c:otherwise>
                  <div class="form-group">
                    <label class="col-xs-2 control-label">链接素材：</label>
                    <div class="col-xs-9 col-xs-offset-2">
                      <textarea class="form-control" rows="3" readonly>${advertisement.material.link}</textarea>
                    </div>
                  </div>
                </c:otherwise>
              </c:choose>

            </div>
                    
						<div class="beast-breadcrumb-wrapper top-margin-20">
							<div class="beast-breadcrumb yellow clearfix">
								<h2>
									<span>认领统计</span>
								</h2>
							</div>
						</div>
						
						<div class="form-horizontal bottom-margin-20">
						  <div class="form-group">
                <label class="col-xs-2 control-label">总计：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">
                    <c:choose>
		                  <c:when test="${advertisement.type eq 'BUDGET'}">
		                    <span>${advertisement.putNumber}&nbsp;元</span>
		                  </c:when>
		                  <c:when test="${advertisement.type eq 'QUANTITY'}">
		                    <span>${advertisement.putNumber}&nbsp;阅读量</span>
		                  </c:when>
		                </c:choose>
                  </p>
                </div>
                <label class="col-xs-2 control-label">预估认领量：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">
                    <label class="label label-outline label-info">还未实现</label>
                  </p>
                </div>
              </div>
						</div>
						
						<div class="form-horizontal bottom-margin-20">
              <div class="form-group">
                <label class="col-xs-2 control-label">已有：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">
                    ${advertisement.claimNumber}&nbsp;认领任务
                  </p>
                </div>
                <label class="col-xs-2 control-label">还剩余：</label>
                <div class="col-xs-4 pull-left">
                  <p class="form-control-static">
                    <label class="label label-outline label-info">还未实现</label>
                  </p>
                </div>
              </div>
            </div>

						
					</div>
				</div>
			</div>
	</div>
	<%@ include file="/WEB-INF/include/footer.jsp"%>
	<%@ include file="/WEB-INF/include/script.jsp"%>
	<script src="${ctx.resource}/js/shiftform.js"></script>
	<script src="${ctx.resource}/js/select2.min.js"></script>
	<script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>
	<script src="${ctx.resource}/js/bootstrap-datetimepicker.js"></script>
	<script src="${ctx.resource}/js/bootstrap-datetimepicker.zh-CN.js"></script>
</body>

</html>
